Reconnecting Host to Contrail Windows CI cluster
This document describes a procedure required to reconnected a VMware ESXi host to the Contrail Windows CI cluster. Reconnecting a host to CI cluster is understood as a set to steps leading to usage of this host in Contrail Windows CI.
Described procedure must be performed only when:
- a host with reinstalled ESXi must be reconnected to the cluster,
- a host with replaced hard drive must be reconnected to the cluster.
Prerequisites
Requirements for CI admin:
- Access to Contrail Windows CI infrastructure.
- Credentials to Contrail Windows CI VMware cluster.
- Browser with Flash support, preferably Chrome.
Requirements for a reconnected host:
- Host must be connected to vCenter.
Steps
- Open the vSphere Web Client and login using credentials provided by Contrail Windows CI team.
- In
Navigatorpane selectHosts and clusterstab. - Expand
CI-DCdatacenter entry. - Expand
WinCIcluster entry. - Find a host entry representing a being reconnected.
- If a host cannot be found, it is not connected to vCenter. In that case, please contact infrastructure team.
- if a host is connected to vCenter, but is not a part of
WinCIcluster:- Right click on the host and select
Move To...option. - In the
Move To...window, expandCI-DCdatacenter. - Click on
WinCIcluster. - Click
OKbutton. - If a dialog
Move Host into This Clustercomes up, selectPut all of this host's virtual machines in the cluster's root resource pooloption. - Click
Ok.
- Right click on the host and select
- If a host is marked as being in
maintenance mode:- Right click on a host entry and select
Maintenance mode > Exit maintenance mode.
- Right click on a host entry and select
- Click on the host entry.
- Host networking reconfiguration:
- In the middle pane select
Configuretab. - Select
Virtual switchesfrom the list on the left. - Select
vSwitch0from the virtual switches list. - Click on
VM Networkport group in the bottom. - Click
Edit settingsbutton. - Type in
VM-Networkin theNetwork labelinput and clickOkbutton. - Select
VMkernel adaptersfrom the list on the left. - Select on
vmk0adapter from the adapter list. - Click
Edit settingsbutton. - In
Port propertieswizard page, checkvMotioncheckbox. ClickOkbutton.
- In the middle pane select
- In
Navigatorpane selectStoragetab.- Right click on
NFS-Datastoreand selectMount Datastore to Additional Hosts. - Mark a checkbox next to a host entry representing a being reconnected.
- Click
OK. - Right click on
winci_nfsbackupand selectMount Datastore to Additional Hosts. - Mark a checkbox next to a host entry representing a being reconnected.
- Click
OK.
- Right click on
- In
Navigatorpane selectHosts and clusterstab. - Find a host entry representing a being reconnected and click on it.
- Reconfiguring ESXi logs location to a remote location.
- In the middle pane select
Configuretab. - Select
Advanced System Settingsfrom the list on the left. - Click
Editbutton in the upper right corner. - Type in
logDirin theFilterinput box and press Enter. - Change the value of
Syslog.global.logDirto[NFS-Datastore] logs. - Mark the
Enabledcheckbox inSyslog.global.logDirUnique. - Click
Okbutton. - Type in
logDirin theFilterinput box and press Enter. - Look through the filtered list and verify that provided options are saved.
- To verify that logs are stored in remote location, perform the following steps:
- In the
Navigatorpane selectStoragetab. - Click on
NFS-Datastore. - In the main pane select
Filestab. - Navigate to
logsdirectory. - Navigate to a directory named with host's hostname.
- ESXi logs should be stored in this directory.
- Go back to host's entry in
Hosts and clusterstab inNavigatorpane.
- In the
- In the middle pane select
- Cleanup of orphaned VMs must be performed.
- In the middle pane select
VMstab. - In the VM table, click
Nameheader to sort VMs by name in ascending order. - For each VM perform a following process:
- Determine if the VM is critical.
- Refer to List of all important VMs in Windows CI and check if this VM is on the list marked as
CRITICAL.- In case of any doubts, please contact Contrail Windows CI team.
- Refer to List of all important VMs in Windows CI and check if this VM is on the list marked as
- If the VM is marked as
Orphanedand it is not critical to CI functioning:- Left click on the VM.
- In the middle pane, scroll down to
Related Objectswindow and check if VM is still located on local datastore. - If it is the VM must be reregistered and then removed.
- Please follow steps in Reregistering a VM to reregister the VM.
- Right click on the VM and select
Delete from diskoption.
- If it is not, the VM can be safely removed from inventory.
- Right click on the VM.
- Select
All Virtual Infrastructure Actions > Remove from Inventoryoption.
- If a VM is marked as
Orphanedand it is critical to CI functioning:- Left click on the VM.
- In the middle pane, scroll down to
Related Objectswindow and check if VM is still located on local datastore. - If it is the VM must be reregistered.
- Please follow steps in Reregistering a VM reregister the VM.
- Power on the VM.
- If it is not, the VM must be restored from backups.
- Please refer to Infrastructure backups.
- Determine if the VM is critical.
- In the middle pane select
- Assign host's datastores to datastore clusters.
- In the middle pane select
Datastorestab. - Please contact a Contrail Windows CI team regarding datastore - cluster association and perform the following steps:
- Right click on a datastore.
- Select
Move tooption. - In the
Move To...window select a datastore cluster based on information from Contrail Windows CI team.
- In the middle pane select
After reconnecting
After host is reconnected to Contrail Windows CI cluster, please consider the following:
- Migrate some of
ci-builder-*nodes to this new host.- TODO: document
Appendices
Reregistering a VM
This guide assumes that the user is located in the VM window.
- Take note of a datastore names presented in
Related Objectswindows. - Right click on the VM in the list on the left.
- Select
All Virtual Infrastructure Actions > Remove from Inventoryoption. - In the
Navigationpane, left clickStoragetab. - In the datastore list, click on the one of datastores listed previously in
Related Objectswindow. - Navigate to
Filestab. - Locate a folder named like a VM and enter it.
- If it cannot be found on this datastore, try another one.
- Right click on
[VM-NAME].vmxfile and selectRegister VMoption.- The
Register Virtual Machinewizard should show up. - In the
Name and Locationstep select a suitable folder to put a VM in. - Click
Next. - In the
Host / Clusterstep select aWinCIcluster. - Click
Next. - In the
Ready to Completestep clickFinishbutton.
- The